<template>
	<view> <!--  -->
		<!-- <z-paging ref="paging" v-model="dataList" @query="getDataListAll" :show-loading-more-no-more-view="false"> -->
			<!-- <view slot="top">
				<u-navbar title="表单列表" placeholder :autoBack="true" leftIconColor="#fff" bgColor="#00000000"
					:titleStyle="titleStyle">
				</u-navbar>
			</view> -->
			<u-navbar title="表单列表" placeholder :autoBack="true" leftIconColor="#333" bgColor="#fff"
				:titleStyle="titleStyle">
			</u-navbar>
			<view @click="onInfoClick(item)" class="itemV" v-for="(item,index) in list" :key="index">
				<!-- <image class="itemIv"></image> -->
				<view class="itemTv1">{{item.title}}</view>
				<!-- <view class="itemTv2">{{item.money}}</view> -->
			</view>
		<!-- </z-paging> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titleStyle: {
					"color": "#333"
				},
				dataList: [],
				list: [],
				page: 1,
				limit: 10,
				last_page: 1,
				status: "loadmore",
			}
		},
		onLoad() {
			
		},
		onShow(){
			this.getClear()
		},
		onReachBottom: function () {
			this.loadmore();
		},
		methods: {
			typeClick(item) {
				this.typeinfo = item
				this.getClear()
			},
			orderClick(item) {
				this.orderinfo = item
				this.getClear()
			},
			getClear() {
				this.list = []
				this.page = 1,
					this.status = "loadmore"
				this.getList()
			},
			getsou(e) {
				this.keywords = e
				this.getClear()

			},
			loadmore() {
				let page = this.page;
				if (this.status == 'loadmore') {
					this.page++;
					this.getList();
				}
			},

			getList() {
				this.$api.formgetList({
					page:this.page
				}).then((res) => {
					console.log(res)
					this.last_page = res.lastpage;
					let list = res.list;
					this.list = this.page == 1 ? list : [...this.list, ...list];
					if (this.page >= this.last_page) {
						this.status = 'nomore';
					}
				}).catch((e) => {
					// this.$refs.paging.complete(false);
				})
			},
			onInfoClick(item) {
				this.$u.route({
					url: '/mine/me/Form',
					params: {
						id: item.id,
					}
				})
			},
		}
	}
</script>

<style>
	.itemV {
		height: 152rpx;
		display: flex;
		align-items: center;
		background-color: #1f1f1f;
		border-radius: 10rpx;
		margin: 30rpx;
		padding-left: 50rpx;
		padding-right: 50rpx;
		background-image: url('https://s1.ax1x.com/2023/07/21/pCbZx4e.png');
		background-size: 100% 100%;
	}

	.itemIv {
		width: 80rpx;
		height: 80rpx;
		border-radius: 10rpx;
	}

	.itemTv1 {
		flex: 1;
		margin-left: 24rpx;
		font-size: 32rpx;
		color: #fff;
	}

	.itemTv2 {
		font-size: 50rpx;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-weight: 600;
		color: #E6A5B4;
	}
</style>